﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

using QuDao;
using FineUICore;
using Kalman;
using Kalman.Extensions;

namespace AdminUI.Pages.SysManage
{
    public partial class RoleAddModel : BaseModel
    {
        public void OnGet()
        {
        }

        public IActionResult OnPostBtnSubmit_Click(Role dto)
        {
            var id = RoleBO.Instance.Add(dto);
            LogAction(ActionType.新增, $"新增角色：{id}-{dto.RoleName}");

            FineUICore.PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
            //ActiveWindow.HidePostBack();
            return UIHelper.Result();
        }

    }
}